package com.iretailer.report.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: report
 * @description:
 * @author: Bennie
 * @create: 2020-06-10 14:25
 **/
@AllArgsConstructor
@Getter
public enum WindDirection {

    E("E", "东风"),
    W("W","西风"),
    S("S","南风"),
    N("N","北风"),
    SE("SE", "东南风"),
    NE("NE", "东北风"),
    SW("SW", "西南风"),
    NW("NW", "西北风"),
    UNKNOWN("UNKNOWN", "未知");

    private String en, zh;

    public static WindDirection getByEn(String en) {
        for (WindDirection windDirection : WindDirection.values()) {
            if (windDirection.en.equals(en)) return windDirection;
        }
        return UNKNOWN;
    }
}